import request from '@/utils/request'

export function login(data) {
  return request({
    url: 'jeecg-boot/web/user/login',
    method: 'post',
    data
  })
}
export function register(data) {
  return request({
    url: 'jeecg-boot/web/user/register',
    method: 'post',
    data
  })
}

export function randomImage(data) {
  return request({
    url: 'jeecg-boot/web/user/randomImage/' + data,
    method: 'get',
  })
}

export function activationCode(data) {
  return request({
    url: 'jeecg-boot/web/user/activationCode?' + "code=" + data,
    method: 'get',
  })
}

export function getVipInfo() {
  return request({
    url: 'jeecg-boot/web/user/getVipInfo',
    method: 'get',
  })
}

export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}
